import React from 'react';
import { SvgIcon } from '@/components/icon';
import { DEFAULT_ICON_SIZE } from '@/common';
import { useTranslation } from 'react-i18next';

interface Props {
  iconSize?: number;
  textClassName?: string;
  fontText?: React.ReactNode;
  className?: string;
}

export const Empty = ({ iconSize = DEFAULT_ICON_SIZE, textClassName, fontText, className }: Props) => {
  const { t } = useTranslation();
  return (
    <div className={`h-full flex flex-col items-center justify-center text-grays ${className}`}>
      <SvgIcon icon="icon-no-data" size={iconSize} />
      <div className={`mt-2 ${textClassName ? textClassName : 'text-sm'}`}>
        {fontText ?? t('page.empty')}
      </div>
    </div>
  );
};
